<?
	abstract class Devmod_methods_abstraction extends Devmod_base {

		protected $name = null;

		protected $type = null;

		protected $config = null;

		protected $after_operation = array(); // registered binds after operation
		
		protected $after_finalized = array(); // registered binds after finalized

		protected $registered_vars = array();

		protected $overwrite_config = false;

		protected $cross_call = array();
		
		public $tmp_config = array();

		public function __construct($name, $type, $base_config, $view)
		{
			parent::__construct();
			
			$this->name = $name; $this->type = $type; $this->config = $base_config; $this->view = $view;
			
		}

		protected function update_config($key, $value)
		{
			$this->tmp_config = array_merge_recursive($this->tmp_config, array($key => $value));
		}
		
		protected function update_new_config($config)
		{
			$this->config = $config;
		}

		protected function register_var($var, $value)
		{
			$this->registered_vars[$var] = $value;
		}

		protected function get_var($var)
		{
			return $this->registered_vars[$var];
		}
		
		public function get_vars()
		{
			return $this->registered_vars;
		}

		protected function get_config()
		{
			return $this->tmp_config;
		}
		
		protected function cross_call($function, $args)
		{
			$this->cross_call[$function] = $args;
		}

		protected function get_cross_calls()
		{
			return $this->cross_call;
		}

		abstract protected function set_config($args);

	}
